package com.gudy.engine.bean.command;

import lombok.Builder;
import lombok.ToString;
import org.eclipse.collections.impl.map.mutable.primitive.IntObjectHashMap;
import thirdpart.hq.L1MarketData;
import thirdpart.order.CmdType;
import thirdpart.order.OrderDirection;
import thirdpart.order.OrderType;
import com.gudy.engine.bean.orderbook.MatchEvent;
import java.util.List;

@Builder
@ToString
public class RbCmd {

    public long timestamp;

    /*会员id*/
    public short mid;

    /*用户id*/
    public long uid;

    /*类型*/
    public CmdType command;

    /*股票代码*/
    public int code;
    /*委托方向*/
    public OrderDirection direction;
    /*价格*/
    public long price;
    /*成交量*/
    public long volume;
    /*委托编号*/
    public long oid;
    /*委托类型*/
    public OrderType orderType;

    // 保存撮合结果 撮合模块用来对外发布撮合结果 所有的撮合结果都会放到这个list中流转到后续的handler
    public List<MatchEvent> matchEventList;

    // 前置风控 --> 撮合 --> 发布 前一个线程向后面的线程通知执行状态
    public CmdResultCode resultCode;

    // 保存行情
    public IntObjectHashMap<L1MarketData> marketDataMap;
}
